home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / pcpad.arc / PC-PAD.DOC < prev   
Encoding:
Text File  |  1986-04-25  |  20.4 KB  |  395 lines

  1.  
  2. PC\PAD                  USER'S GUIDE                  4/08/83
  3.  
  4.  
  5.  
  6.  
  7.                       PC\PAD (ver. 1.3)
  8.  
  9.  
  10.             A Word Processing/Spreadsheet Program
  11.                 For the IBM Personal Computer
  12.  
  13.                    (c) 1983 by P. Fraundorf
  14.                         P.O. Box 11394
  15.                       St. Louis MO 63105
  16.  
  17.  
  18.  
  19.                       TABLE OF CONTENTS
  20.  
  21.                     I. General Information
  22.  
  23.                      II. Getting Started
  24.  
  25.            III. The MS-BASIC full-screen line-editor
  26.  
  27.              IV. The Twenty Programmed Functions
  28.  
  29.                        V. View and Help
  30.  
  31.                    VI. Window Movement Keys
  32.  
  33.                   VII. Text Processing Keys
  34.  
  35.                 VIII. Spreadsheet Programming
  36.  
  37.                    IX. Saving and Printing
  38.  
  39.                      X. Future Directions
  40.  
  41.                         XI. Disclaimer
  42.  
  43.  
  44.        If you are using this program and find it of value,
  45.        a contribution ($20 suggested) will be appreciated.
  46.  
  47.          Regardless of whether you make a contribution,
  48.        you are encouraged to copy and share this program.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. I. GENERAL INFORMATION:
  59.      PC\PAD  is  a  word processing/ spreadsheet (or "wordsheet")
  60. program  designed  around the MS-BASIC full-screen line-editor to
  61. provide   text-editing,  spreadsheet  computation,  and  printing
  62. capabilities  with  minimum complication.  Its design is based on
  63. the  thought  that  many  users  of  such software would prefer a
  64. simple  set  of  useful  functions (with option to expand to meet
  65. special  needs)  instead  of  the  general  capability (and hence
  66. complexity) built into bigger programs.  It uses the programmable
  67. function keys on the IBM keyboard to build on capabilities of the
  68. resident editor. This approach economizes on program size (around
  69. 9K  bytes)  while  providing  full  support of the familiar BASIC
  70. editing protocols. Commands, especially at the character and word
  71. level,  once  mastered for either PC\PAD or the BASIC editor, are
  72. thus automatically mastered for both.
  73.      The  program  is  itself  written  in  BASIC, with a modular
  74. structure  for  easy  modification  or  expansion.   In  addition
  75. to  making  the  BASIC  editor  available for work on text files,
  76. PC\PAD  provides:  (i)  a 256-character (16 column) by N-row text
  77. area*  which  is  spreadsheet  programmable  using  simple  BASIC
  78. routines; (ii) the programmed  line-operations  of  Enter,  Yank,
  79. Put,  Block-Insert, Block-Delete and Right-Justify for manuscript
  80. preparation; and (iii) a  routine  for  IBM/EPSON  printing  with
  81. variable  margins,  line-spacings, and even subscripts if needed.
  82. Along  with  this user's guide (file PC\PAD.DOC), PC\PAD provides
  83. an  on-line  "help  file"  to  aid  user's  in implementing these
  84. functions.
  85.      PC\PAD as written is set up for an IBM-PC with 64K of memory
  86. (48K should work), a single disk drive, and an 80-column monitor.
  87. A printer is optional, although probably desirable.  As indicated
  88. above, it also requires IBM's disk BASIC (or BASICA) to run.  The
  89. BASIC workspace has room for nearly 30K characters of text with a
  90. 64K system, probably around 14K with 48K.
  91.      A  limited  license is granted to all users of this program,
  92. to  make  copies  and  distribute  them  to  other  users, on the
  93. following conditions:
  94.      1.  that the notices contained in lines 20  through  180  of
  95.         the program are not altered or removed;
  96.      2.  that   the   program  is  distributed  along  with  this
  97.         documentation to others in unmodified form; and
  98.      3.  that no fee is charged for copying or  distributing  the
  99.         program  without  an  express  written agreement with the
  100.         author.
  101.      The PC\PAD marketing philosophy of  voluntary  user  support
  102. bears  similarities to that employed in the marketing of FREEWARE
  103. (a trademark of The Headlands Press,  Inc.).   User  response  is
  104. welcome, in the form of ideas and/or funds in return for a useful
  105. product.   My  ability  to  issue  upgrades  through  established
  106. distribution  channels  (I  am  NOT  equipped  to provide program
  107. copies on request) will reflect the extent of that response.
  108.  
  109. *N depends on RAM available in the BASIC program buffer.  With a
  110. 64K system, this file (nearly 400 lines) fits, but speed suffers.
  111.  
  112.  
  113. II. GETTING STARTED:
  114.      There  are  numerous  files  on  your disk.  As you may have
  115. discovered,  the  file PC\PAD.DOC contains this user's guide. The
  116. program itself is in file PC\PAD.BAS.  This program can be run in
  117. the  usual  way  from BASIC (type: run "pc\pad"), or started from
  118. DOS by using the batch file PC\PAD.BAT (type: pc\pad).
  119.      Because PC\PAD utilizes the disk operating system and BASIC,
  120. it  is  helpful  to  transfer  the  PC\PAD files to a system disk
  121. containing  BASIC.   This  also serves to "back up" your original
  122. copy of the program.  These files can be transferred individually
  123. (only  PC\PAD.BAS  is needed to run the program), or the full set
  124. can  be  transferred  using  the batch file "COPYPAD.BAT" (in DOS
  125. type:  copypad).   Note  that  drives A and B refer to source and
  126. target disks, respectively.
  127.      Finally,  a  demo  "wordsheet"  file  (DEMOPAD) to provide a
  128. taste  of  PC\PAD capabilities, and a general purpose spreadsheet
  129. instruction  program  for keeping row-column totals (ROWCOL.BAS),
  130. are included on the disk as well.
  131.      When   you   run   PC\PAD,   the   program   begins  with  a
  132. title/information page, and the prompt "any key to  continue...".
  133. Push  any single key, and the program then lists the files on the
  134. disk,  and  requests  a  disk  file  name.   If none is given, it
  135. assumes  that you want to start from scratch.  In either case, it
  136. then  asks  for a working file name: the filename under which the
  137. product of this editing session is to be stored. Perhaps the best
  138. way to get a feel for the program is to initially specify DEMOPAD
  139. as the disk file, and DEMOPAD.J as the working file name (it's OK
  140. to  specify  filenames in lowercase for convenience). Then follow
  141. the instructions shown in the file.
  142.      Where  starting  is first discussed, quitting should also be
  143. mentioned.   Key  [F10]  saves  a working file to disk.  Pressing
  144. backslash  twice, the letter q, and Enter initiates request for a
  145. new  filename  without saving the working file.  This sequence is
  146. intentionally  complicated,  because  it  should  not be executed
  147. thoughtlessly   without  first  saving  an  important  file.  Two
  148. consecutive  Enters  after that (to each of the filename prompts)
  149. exits the program. Ctrl-Break at most any time does that as well.
  150.  
  151.  
  152. III. THE MS-BASIC FULL-SCREEN LINE-EDITOR.
  153.      Possibly  one of the most economical things that PC\PAD does
  154. is  that  it makes the BASIC program editor available for work on
  155. text  files.   Now  if you edit BASIC programs, you don't need to
  156. master new protocols to edit text, and vice versa.
  157.      The editor functions that become available include character
  158. operations   (Destructive-Backspace,  Insert,  Delete,  Alt-###),
  159. cursor    movements    (Up,   Down,   Left,   Right,   Next-Word,
  160. Previous-Word, Home, End), tab, erase line (Esc), erase to end of
  161. line (Ctrl-End), and print screen (Shift-PrtSc).  These functions
  162. are documented in some detail on pp. 2-13 through 2-31 of the IBM
  163. BASIC  Manual  (2nd  Edition,  ver.  1.1),  and hence will not be
  164. discussed here.
  165.      The   Enter  function,  perhaps  the  most  fundamental  for
  166. operation  of the BASIC editor, plays a similar role for  PC\PAD.
  167. However  unlike  the  functions mentioned above, the PC\PAD Enter
  168. function  is  a programmed operation which differs from the BASIC
  169. Enter  function.  First, it Enters into the working file ONLY the
  170. physical  screen line immediately above the cursor position after
  171. execution; not the literal line (which may take up several screen
  172. lines  due  to  wraparound)  as  in  the case of the BASIC screen
  173. editor.   For  this  reason, if a screen gets "contaminated" with
  174. wraparound  lines  (for example when the cursor is allowed to run
  175. off  the  right  edge of the screen and logically link two screen
  176. lines),  then the best bet is to relist the screen using the View
  177. function  [F1]  before trying to read modifications back into the
  178. file.   Secondly, because PC\PAD Enter is programmed in BASIC, it
  179. operates a bit slower than the BASIC editor version, and hence is
  180. a  prime  candidate  for an assembler routine in future upgrades.
  181. Suggestions are invited.
  182.  
  183.  
  184. IV. THE TWENTY PROGRAMMED FUNCTIONS.
  185.      In  addition  to making BASIC editor functions available for
  186. work  on  text, PC\PAD provides a set of add-on functions, chosen
  187. to  make  PC\PAD  able to perform a wide range of word processing
  188. and  spreadsheet  operations.  The set of available functions has
  189. been  kept small and simple so that telling the computer what you
  190. want  to  do is also simple.  Although there is no reason why you
  191. couldn't  expand  this  set  of functions, it is also possible to
  192. stick  with  it  while  specializing individual functions to your
  193. needs   (or   eliminating   them  altogether).   Most  individual
  194. functions  are  sandwiched  in  the  program listing (PC\PAD.BAS)
  195. between rows of double-dashes (=====) for easy identification.
  196.      The  programmed  functions  that  have  been chosen for this
  197. version   of   PC\PAD   fall   naturally  into  five  operational
  198. categories,  each  of  which  will  be  taken  up  in  succeeding
  199. sections.   In  order  to implement these functions, a particular
  200. ASCII  character (here the "backslash" symbol 092) has been given
  201. special status as a control character.  If you  try  to  Enter  a
  202. screen line containing this character in combination with control
  203. words  (like  "view  "), the line will not be Entered but instead
  204. the indicated function performed.  Also control characters cannot
  205. be Entered at all during Line-Insert mode.  Although  "backslash"
  206. is  a  convenient choice of control symbol for my applications, a
  207. different one may suit yours, and hence the program is written to
  208. allow  redefinition  of  the  control character (variable CC$) in
  209. line 190 of the program.
  210.  
  211.  
  212. V. VIEW AND HELP.
  213.      View  and  Help  are two "information" functions assigned to
  214. the  [F1]  key.   By their nature, they change no parameters, but
  215. are  designed  simply  to  inform  you  of  an  existing state of
  216. affairs.   The Help function, invoked with backslash [F1], simply
  217. lists  the  20 programmed functions and their key assignments for
  218. reference  when  needed.   The  View function, invoked with [F1],
  219. puts an image of the present "window" into the working file up on
  220. the screen.  Since the screen can be changed independently of the
  221. file,  it is often useful to push [F1] to clarify the file status
  222. if  there  is  reason to think that correspondence between screen
  223. and  file  has been lost.  This function is automatically invoked
  224. on  completion  of  some of the other function calls, so that the
  225. operator is updated appropriately concerning changes in the file,
  226. or the window into it.
  227.  
  228.  
  229. VI. WINDOW MOVEMENT KEYS.
  230.      As  indicated  earlier,  the  working file (or wordsheet) is
  231. made  up  of  a 256-character (16 "column") by N-line text  area.
  232. The division of the wordsheet into equally spaced "columns", each
  233. 16  characters wide, is done to simplify spreadsheet programming.
  234. Through  use  of  the  View  function,  the  screen  provides  an
  235. 80-character  (5 "column") by 23-line window onto that wordsheet.
  236. The  25th  line  of  the  screen  provides the usual function key
  237. labels, while the 24th line pinpoints the location of the window.
  238. When  the  file  is  first  opened,  the window is located in the
  239. upper  left hand corner of the wordsheet.  On the screen one sees
  240. lines 0 to 22, and "columns" 0 to 4.
  241.      Movement  of  this  window  is  controlled  with  the window
  242. movement  keys  [F3] through [F6].  [F3] and [F4] move the window
  243. up  and  down  one line, respectively.  Pressing backslash before
  244. either of these keys results in the same function being executed,
  245. except  with  20-line  instead of 1-line motion increments.  Keys
  246. [F5]  and  [F6]  perform  a similar function for movements of the
  247. window left and right. Without a prior backslash, the motion is a
  248. half-"column" (8 characters), whereas with a prior backslash, the
  249. motion  is  a  full  4  "columns"  (64  characters).  Rather than
  250. performing  this  motion  with  a  scroll,  these window movement
  251. routines  update  the screen by simply invoking the View function
  252. on   completion.    Assembler  scrolling  routines  might  be  an
  253. interesting area for concentration in program updates.
  254.  
  255.  
  256. VII. TEXT PROCESSING KEYS.
  257.      One  of  the major advantages of a computer worksheet over a
  258. typewriter  worksheet  lies  in  the  ability to reorganize whole
  259. lines  in  a  manuscript.  The BASIC editor is weak in this area,
  260. and  hence  several  programmed  functions  have been designed to
  261. provide this ability.  Emphasis has been on easy-to-remember line
  262. operations  with  optional  block  capability, for the benefit of
  263. those   whose   use  of  the computer for text processing is only
  264. part time.
  265.      The two  simplest functions are Yank [F7] and Put [F8].  The
  266. first simply "yanks" a copy of a block of lines, beginning at the
  267. cursor  position,  and  puts  it  into memory variable M$().  The
  268. Delete  function  (backslash+[F7]) provides a "destructive" Yank,
  269. in  which the chosen block is copied into memory and removed from
  270. the text.  Thus it provides a way to delete whole lines.  The Put
  271. function [F8], as you might guess, simply inserts the last Yanked
  272. block  into  text at the indicated cursor location.  One can, for
  273. example,  insert  blank  lines  into  text where needed by simply
  274. Yanking  one blank line, and then replicating it using Put at the
  275. desired locations.
  276.      For  the  occassions  when one wants to insert new text into
  277. the   midst   of   pre-existing  text,  the  Line-Insert  command
  278. (backslash+[F8])  causes  the existing cursor to "split", opening
  279. up  a  new  line  of  text. This insertion loop only accepts text
  280. typed  into  the newly opened line.  As each line is Entered into
  281. the  working  file  in the usual way, another "insertion" line is
  282. opened  up  after.  Any other command key or just  the  backslash
  283. will  put  the  cursor back together into one piece, close up the
  284. present  "insertion"  line,  and  return  you  to the full screen
  285. editor.
  286.      The  last  (and  longest)  of the text processing functions,
  287. Justify,  allows you to right-justify text to an arbitrary width.
  288. This  trick is quite difficult to do with an ordinary typewriter.
  289. The desired linewidth is requested the first time the Justify key
  290. [F9]  is  pushed.   Afterwards,  it  can  be respecified with the
  291. J-Options  function  (backslash+[F9]).  This function also allows
  292. you  to right-justify arbitrarily large blocks, rather than doing
  293. it line by line.
  294.      One of the reasons for the amount of code  requried  by  the
  295. Justify  function  is  that  it  gives special status to indented
  296. lines,  lest  it be tempted to run paragraphs together.  Although
  297. this implemented logic allows one to use Justify automatically on
  298. whole  blocks of text at once, it also prevents it from operating
  299. (at least in the current version) on indented paragraphs.  If you
  300. must  justify indented text, it is therefore recommended that you
  301. type  the  text  without indentation, justify it, and then indent
  302. (either with the editor, or while printing).
  303.      Finally, although Justify adds  spaces  between  words  when
  304. they  are  needed,  it  has not been allowed to remove them.  For
  305. that  reason,  lest you want spaces to multiply without bound, it
  306. is  best to justify each line no more than once.  Obviously, then
  307. it  is also best to begin with the first line in a paragraph, and
  308. work your way down.
  309.  
  310.  
  311. VIII. SPREADSHEET PROGRAMMING.
  312.      Given  a  large  wordsheet  with  text editing capabilities,
  313. wouldn't it be nice to also have the option of programming it, so
  314. that  various  portions  of  the  sheet automatically reflect the
  315. state  of  other  portions  of  the  sheet?  Thanks to the string
  316. handling  and  computational  ability  of  MS-BASIC,  this  is  a
  317. remarkably  easy thing to do.  PC\PAD aids the user in doing this
  318. by  providing  a  set  of subroutines for wordsheet access, and a
  319. Computation   function   [F2]   for  merging  and  running  BASIC
  320. instructions for wordsheet formatting.
  321.      The  4  subroutines  available in this version of PC\PAD are
  322. (a)  the function FNV(I,J) which reads the "numerical value" (see
  323. the BASIC function VAL) from the wordsheet cell in line I, column
  324. J;  (b) subroutines 9900 and 9920 which insert, respectively, the
  325. number  X  and the string X$ into the cell at line I, column J in
  326. the wordsheet; and (c) subroutine 9630 for forming column and row
  327. sums given line/column of the top-left cell (NROW0/NCOL0) and the
  328. number of rows and columns to be summed (NROW/NCOL).
  329.      An example of the use of these subroutines is illustrated in
  330. the  demonstration  file  DEMOPAD  using  the  5-line instruction
  331. program  ROWCOL.BAS.   Once  the instruction program is in  place
  332. (it is first merged, on naming, into program lines 10000 and up),
  333. one   simply  presses  [F2]  to  update  the  computations.   The
  334. flexibility   of   MS-BASIC  for  this  kind  of  application  is
  335. impressive,  and  I  look  forward  to  an  expanding  library of
  336. specific  solutions as the spreadsheet capability of PC\PAD has a
  337. chance to mature. User ideas and suggestions are most welcome.
  338.      PC\PAD  requires of the instruction program that it: (i) has
  339. lines  numbered  from  10000 and up;  (ii) includes the statement
  340. "ON  ERROR  GOTO 5000" to invoke error trapping which seems to be
  341. cancelled during the CHAIN MERGE operation;  (iii) return program
  342. control  to  the  View  function (line 450) after completion; and
  343. (iv)  be stored as an ASCII file on disk. Because of the need for
  344. specific  line  references  in the main program, one must also be
  345. careful about renumbering the main routine independently.
  346.  
  347.  
  348. IX. SAVING AND PRINTING.
  349.      As  already  mentioned,  the  Save function [F10] places the
  350. current working file on disk in a file with the working filename.
  351. The  working  filename  can  be changed using the Reset Filenames
  352. function  (backslash+[F2]) mentioned above.  You should make it a
  353. habit  to  save  your  work  periodically  during  a long working
  354. session,  to  minimize  the  loss  in  case of a power failure or
  355. memory lapse later on.
  356.      The  other  method  for  outputting  the file is to print it
  357. using  the  Print routine (backslash+[F10]).  This routine asks a
  358. lot  of  questions,  but basically if you want to print the whole
  359. file  in  normal  80-column  format  without  indenting, you just
  360. answer  all  the  questions  with  return.   I  usually work with
  361. un-indented  text  files  (for use with the Justify routine), and
  362. print  rough  drafts in this default format except for 1" margins
  363. and a 10 space indentation.
  364.      The  large  number  of questions that are asked allow you to
  365. access  a  wide  range  of  printer options.  In doing scientific
  366. writing,  for  example,  in which superscripts and subscripts are
  367. abundant,  I  create  a  triple-spaced text file in the computer,
  368. with  super  and  sub-scripts  on the intervening lines, and then
  369. print   out   using   1/3   normal  line   spacing:   Viola!.....
  370. professional-looking super and sub-scripted single-spaced text in
  371. a variety of character sizes and intensities.
  372.  
  373.  
  374. X. FUTURE DIRECTIONS.
  375.      One  shortcoming  of  this  version  of  PC\PAD that becomes
  376. apparent  with  larger  files  (probably  because of the variable
  377. storage  size  of  BASIC strings) is speed.  Two easy things that
  378. could  help are (a) "squishing" of the listing to remove comments
  379. and  increase number of commands per line; and (b) compiling.  If
  380. I can come up  with  a  compiled  version,  I will try to make it
  381. available  with the next upgrade.  Moreover, if there is tangible
  382. user  support  for  the  design  philosophy of this program, some
  383. assembler  programming  of  crucial  routines would be one of the
  384. first items on the menu.
  385.  
  386.  
  387. XI. DISCLAIMER.
  388.      In   no   event   will  the  author be liable to you for any
  389. damages,   including   any  lost  profits,  lost savings or other
  390. incidental  or consequential damages arising out of the use of or
  391. inability  to  use  these  programs,  even if the author has been
  392. advised  of  the possibility of such damages, or for any claim by
  393. any other party.
  394.  
  395.